package cn.lili.controller.promotion;

import cn.lili.common.utils.ResultUtil;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.promotion.entity.dos.TicketArea;
import cn.lili.modules.promotion.entity.vos.TicketAddVO;
import cn.lili.modules.promotion.service.TicketAreaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "门票区域接口")
@RequestMapping("/promotion/ticket/area")
@RequiredArgsConstructor
public class TicketAreaController {
    private final TicketAreaService ticketAreaService;

    @ApiOperation(value = "添加区域")
    @PostMapping("/add")
    public ResultMessage<Void> add(@RequestBody TicketArea ticketArea) {
        ticketArea.setStatus(1);
        ticketAreaService.save(ticketArea);
        return ResultUtil.success();
    }
}
